#ifndef __SKIPLIST_NODE_H__
#define __SKIPLIST_NODE_H__

#include <iostream>
using std::endl;
using std::cout;

class SkipList;

class SLNode {
    friend class SkipList;

public:
    SLNode() {}

    SLNode(int, int);

    ~SLNode();

    void output();

private:
    int key;
    SLNode **forward;
    int nodeLevel;
};

SLNode::SLNode(int k, int level) 
:key(k), nodeLevel(level), forward(new SLNode *[level])
{}

SLNode::~SLNode() {
    delete [] forward;
}

void SLNode::output() {
    cout << key << "->" << nodeLevel << endl;
}

#endif